package com.yujistu.framework.helper;

import com.loopj.android.http.AsyncHttpResponseHandler;
import com.loopj.android.http.RequestParams;
import com.yujistu.framework.http.YuJiHttpCenter;
import com.yujistu.global.GlobalContext;
import com.yujistu.network.StuRestClient;

/**
 * Created by S3YOGA on 2015/11/7.
 */
public class BaseHelper {

    //    public static final String BASE = "http://api.binduyoga.cn/v1.0/";
    //    public static final String BASE = "http://testapi.binduyoga.cn/v1.0/";
    public static final String BASE ="http://doc.yogiplus.cn/v1.0/";

    /* 获取BaseList的数据 */
    public static void getList(String url, int page, int limit, AsyncHttpResponseHandler handler) {
        RequestParams  params = new RequestParams();
        if(GlobalContext.getInstance().isLoginResult()){
            params.put("token", GlobalContext.getInstance().getLogin().getToken());
        }
        params.put("limit", limit);
        params.put("page", page);
        StuRestClient.get(url, params, handler);
    }
}
